from libs.exception import BaseHTTPException
from flask_babel import gettext as _

class HUserAddrParamError(BaseHTTPException):
    error_code = "user_addr_param_error"
    code = 400
    def __init__(self,message:str|None):
        message = message or ""
        self.description = _("User address parameter error.{message}").format(message=message)
        super().__init__(self.description)

class HUserAddrNotFoundError(BaseHTTPException):
    error_code = "user_addr_notfound_error"
    code = 400
    def __init__(self,addr_id:str|None):
        addr_id = addr_id or ""
        self.description = _("User address not found error.{message}").format(message=addr_id)
        super().__init__(self.description)